<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <title>订单支付回调</title>
    </head>
    <body>
        <h3>回调页面</h3>
        <a href="{{ route('index.order.pay') }}">支付页面</a>
    </body>
</html>
<script type="text/javascript" src="{{ asset('style/jquery-2.0.3.min.js') }}"></script>
<script type="text/javascript" src="{{ asset('plugins/layer/layer.js') }}"></script>
<script type="text/javascript" src="{{ asset('js/api_request.js') }}"></script>

<script type="text/javascript">
    $(()=>{
        pay();
    })

    function pay() {

        let data = {
            'charset': "{{ request()->input('charset') }}",
            'out_trade_no': "{{ request()->input('out_trade_no') }}",
            'method': "{{ request()->input('method') }}",
            'total_amount': "{{ request()->input('total_amount') }}",
            'sign': "{{ request()->input('sign') }}",
            'trade_no': "{{ request()->input('trade_no') }}",
            'auth_app_id': "{{ request()->input('auth_app_id') }}",
            'version': "{{ request()->input('version') }}",
            'app_id': "{{ request()->input('app_id') }}",
            'sign_type': "{{ request()->input('sign_type') }}",
            'seller_id': "{{ request()->input('seller_id') }}",
            'timestamp': "{{ request()->input('timestamp') }}",
        }

        requestData('/api/alipay/order_pay_return',data,'post').then((res)=>{
            layer.msg(res.msg);
            console.log(res.msg);
        }).then((res)=>{
            alert(res.msg);
            // layer.msg(res.msg);
        });
    }
</script>
